<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>原型对象</title>
	</head>
	<body>
		<script>
			function Flower(){
				
			}
			Flower.prototype.name="曼陀罗花";
			Flower.prototype.genera="茄科 曼陀罗属";
			Flower.prototype.aras="印度、中国北部";
			Flower.prototype.uses="观赏或用药等";
			Flower.prototype.showName=function(){
				alert(this.name);
			}
			var flower1=new Flower();
			flower1.showName();
			var flower2=new Flower();
			flower2.name="芍药";
			flower2.showName();
			alert(flower2.aras);
			alert(flower1.name);
		</script>
	</body>
</html>
